Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Json output for delete/list + better ABS error handling #86

Merged
merged 2 commits into from
Aug 20, 2020

Conversation

mcdonaldseanp
Copy link
Contributor

Status

[Ready for Merge]

Description

Updates to the list and delete commands to include a --json option so those commands can be used with scripts and automation that require structured output.

Additionally, add better error handling of status codes from ABS

Related Issues

Todos

  • Tests
  • Documentation

Reviewers

@puppetlabs/dio
@highb
@briancain

@mcdonaldseanp mcdonaldseanp requested review from briancain, highb and a team as code owners August 12, 2020 19:58
lib/vmfloaty.rb Outdated Show resolved Hide resolved
Copy link
Contributor

@briancain briancain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple of notes of feedback!

lib/vmfloaty.rb Outdated Show resolved Hide resolved
lib/vmfloaty.rb Show resolved Hide resolved
lib/vmfloaty.rb Show resolved Hide resolved
lib/vmfloaty/utils.rb Show resolved Hide resolved
This commit adds an option `--json` to the list and delete commands. When the
json flag is used the commands will print output as formatted JSON rather than
pretty printed strings.
When ABS returns an http status code other than 200 or 202, the ABS code
should fail
@mcdonaldseanp
Copy link
Contributor Author

@briancain updated :)

Copy link
Contributor

@briancain briancain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good to me. I can't these these against this pooler, so if someone wanted to do that, that would be great :)

@mattkirby mattkirby merged commit d3d6ebe into puppetlabs:master Aug 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants